package com.SunSoft.PhoneRemoteControl;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.widget.EditText;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.message.BasicNameValuePair;

final class fd
  implements DialogInterface.OnClickListener
{
  public final void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    try
    {
      if (this.a.F)
      {
        this.a.aw[3] = this.b.getText().toString();
        this.a.aw[4] = this.c.getText().toString();
        Show_Search.p(this.a).execSQL("insert into control_list (ID,define_ID,control_type,name_ch,brand_ch,control_model,control_version,come_from,device_ID,note,update_time,brand_en,name_en) values (?,?,?,?,?,?,?,?,?,?,?,?,?) ", this.a.aw);
        this.a.aB = this.a.aw[8] + "##" + this.a.aw[3] + "##" + this.a.aw[4] + "##" + this.a.aw[5] + "##";
        paramDialogInterface = this.a;
        Object localObject = Build.MODEL;
        String str1 = Build.VERSION.RELEASE;
        String str2 = paramDialogInterface.ad.a("save_user");
        String str3 = paramDialogInterface.ad.a("user_address");
        paramDialogInterface.aB = paramDialogInterface.aB + str2 + "##android##" + ((String)localObject) + "##" + str1 + "##" + str3 + "##" + String.valueOf(paramDialogInterface.af);
        paramDialogInterface.E = new ArrayList();
        paramDialogInterface.E.add(new BasicNameValuePair("txtUser_name", "android"));
        paramDialogInterface.E.add(new BasicNameValuePair("get_data", paramDialogInterface.aB));
        paramDialogInterface.D = "http://www.tasogo.com/user_add.aspx";
        localObject = new Message();
        ((Message)localObject).what = 13;
        paramDialogInterface.aC.sendMessage((Message)localObject);
        Toast.makeText(this.a, this.a.getString(2131099802), 0).show();
        this.a.G = true;
        this.a.Q = false;
        this.a.finish();
        return;
      }
      this.a.aw[12] = this.b.getText().toString();
      this.a.aw[11] = this.c.getText().toString();
    }
    catch (SQLException paramDialogInterface)
    {
      paramDialogInterface.printStackTrace();
      Toast.makeText(this.a, this.a.getString(2131099803), 0).show();
    }
  }
}